package max.ta.stock;

import java.io.File;
import java.io.IOException;
import java.util.List;

import max.ta.data.access.CSVDataLoader;
import max.ta.data.access.StockeQuoteCSVLoader;
import max.ta.data.entity.StockQuote;

public final class DataLoader {

    // --------------------------------------------------------------------
    private static final File CSV_FILE = new File("data/IBM.csv");
    // --------------------------------------------------------------------
    private static final CSVDataLoader<StockQuote> LOADER = new StockeQuoteCSVLoader();

    public static List<StockQuote> load() throws IOException {
	return LOADER.load(CSV_FILE);
    }

    public static List<StockQuote> load(int lineNumber) throws IOException {
	return LOADER.load(CSV_FILE, lineNumber);
    }
}
